package cn.xbtop.service.impl;

import cn.xbtop.domain.Goods;
import cn.xbtop.mapper.GoodsMapper;
import cn.xbtop.service.GoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/8/5 12:15
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    @Resource
    private GoodsMapper goodsMapper;

    @Override
    public int deleteByPrimaryKey(Integer goodsId) {
        return goodsMapper.deleteByPrimaryKey(goodsId);
    }

    @Override
    public int insert(Goods record) {
        return goodsMapper.insert(record);
    }

    @Override
    public int insertSelective(Goods record) {
        return goodsMapper.insertSelective(record);
    }

    @Override
    public Goods selectByPrimaryKey(Integer goodsId) {
        return goodsMapper.selectByPrimaryKey(goodsId);
    }

    @Override
    public int updateByPrimaryKeySelective(Goods record) {
        return goodsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Goods record) {
        return goodsMapper.updateByPrimaryKey(record);
    }

    @Override
    public boolean updateByPrimaryKeySelective1(Goods record) {
        return goodsMapper.updateByPrimaryKeySelective(record) > 0;
    }

    @Override
    public List<Goods> selectGoodsToMaioSha() {
        Goods good= new Goods();

        return null;
    }
}
